<?php

highlight_file(__FILE__);
error_reporting(0);

class login
{
    public $username;
    public $identity;
    public $chose;

    public function __construct($username,$identity)
    {
        $this->username=$username;
        $this->identity=$identity;
        echo "Enter your user<br/>";
    }

    public function __wakeup()
    {
        if($this->identity==='admin')
        {
            new index("admin","view");
            echo $this->chose;
        }
        else
        {
            echo 'only admin\n';
        }
    }

    public function __destruct(){
        echo "Thanks for using<br/>";
    }
}

class index{

    public $name;
    public $do;    
    
    public function __construct($name,$do)
    {
        echo "welcome index<br/>";
        $this->name=$name;
        $this->do=$do;
    }
    public function __toString(){
        call_user_func($this->name,$this->do);
    }

}

function filter($string){
    return str_replace('easier','easiest',$string);
}

$username=$_GET["username"];
$identity="user";
$ser=filter(serialize(new login($username,$identity)));
$test=unserialize($ser);

?>